<?php require_once('_core.php'); ?>
<?php
Service_Begin();
{	
    $Userid=formArgs('userid');
    $Password=formArgs('password');

    if($Userid==null||$Password==null)
    {
            echo 'false';
    }
    else
    {
            $Sql='select userid,password, from system_manager where userid=? limit 0,1';
            $Connect=FactoryConnection::createConnect('mysqli','Default');
            $Command=$Connect->prepare($Sql);
            {
                    if($Command)
                    {
                        $Result=array('userid'=>NULL,'password'=>NULL);

                        $Command->bind_param('s', $Userid);
                        $Command->execute();
                        $Command->bind_result($Result['userid'],$Result['password']);

                        if ($Command->fetch())
                        {
                            if(strtoupper($Password)!=$Result['password'])
                            {
                                #密码不对
                                echo 'false';
                            }
                            else
                            {
                                #登录成功
                                echo 'true';
                            }
                        }
                        else
                        {
                            #没有找到
                            echo 'false';
                        }
                    }
                    else
                    {
                            #发生错误
                            echo 'false';
                    }
            }
            $Connect->close();
            $Connect=NULL;
    }
}
Service_End();
?>